3DSCALE_GEOM

Section: User Commands (1)
Updated: June 18, 1992
Index Return to Main Contents
 

NAME

3dscale_geom - filtered image scale and translate  

SYNOPSIS

Usage: 3dscale_geom [options]
-c              output color image (RLE) if input is a color image
-#              enlarge (or shrink : # < 0). | # | < 5
-s # # # #      source box (row col #rows #cols)
-dc #           # of cols in destination file (default = source size)
-dr #           # of rows in the destination file
-df #           # of frames in the destination file
-d # # [#]      # of cols, rows, and frames in dest file
-filt %s[%s[%s]]        filter name in x and y (default=triangle)
                        "-filt '?'" prints a filter catalog
-supp %f[%f[%f]]        filter support radius
-blur %f[%f[%f]]        blur factor: >1 is blurry, <1 is sharp
-window %s[%s[%s]]      window an IIR filter (default=blackman)
-debug #        print filter coefficients
-xy             filter x before y
-yx             filter y before x
-plain          disable filter coercion
-keep0          keep zeros in xfilter
Where %d and # denotes integer, %f denotes float, %s denotes string,
and '[' marks optional following args



 

DESCRIPTION

scale_geom scales the geometry of an image file. Any sub-window of the input image can be specified by a location and the number of rows and columns to include. The output image size can be given in terms of the number of row or columns, and the other dimension will automatically be set to yield square pixels.

To run scale_geom, the user specifies the source and destination file using unix stdin and stdout. For example: 3dscale_geom < infile > outfile. The default source box is the entire image, and the default destination box is the source box.

Filters are selected with the -filt option. If given one filter name, -filt will use that filter in both x and y; if given two names, different filters can be used in the two dimensions. The command scale_geom -filt '?' prints the list of filters currently known to scale_geom. That list is:

NAME      SUPPORT
point       0
box         0.5
triangle    1
quadratic   1.5
cubic       2
catrom      2
mitchell    2
gaussian    1.25
sinc        4
bessel      3.24


The option -filt point gives fast pixel replication, -filt triangle (the default) gives bilinear interpolation, which is suitable for most purposes, and -filt mitchell gives slower, very high quality results. The other filters are provided for experimentation. The time required by a filter is proportional to its support.

Most of the filters known to scale_geom are FIR (finite impulse response), with an intrinsic support (width), but some of them (gaussian, sinc, bessel) are IIR (infinite impulse response), and must be truncated at some arbitrary support. This can be done with the -supp option. Again, the defaults are reasonable. The IIR filters can be windowed (brought down to zero) with various window functions listed below:


hanning
hamming
blackman
kaiser



The sinc and bessel filters are blackman-windowed by default. Filters can be scaled artificially to blur or sharpen them with the -blur option.  

EXAMPLES

 

3dscale_geom -dr 400 < infile > outfile

The output file will have 400 rows and whatever number of columns necessary to give square pixels. The default filter (triangle) is used.

 

3dscale_geom -s 10 10 200 200 -d 250 300 200 -filt sinc < infile > outfile

The output file will be the image starting at location (10, 10) in the input file, and extending 200 rows and columns from that point. This image will be scaled to a size of 250 by 300, using a sinc filter.

 

3dscale_geom -c --2.375 < in_image > outfile

The output file will be a color image if input file is a color image. The output size is shrinked (scale down) to 0.421 of the input file size.

 

SEE ALSO

fIDiscrete Time Signal Processing, Alan Oppenheim, Ronald Schafer, 1989.  

AUTHOR

Paul Heckbert, UC Berkeley, August 1989. ph@miro.berkeley.edu

Jin Guojun - LBL, modified for handling 3D and any type of images. g_jin@lbl.gov


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
3dscale_geom -dr 400 < infile > outfile
3dscale_geom -s 10 10 200 200 -d 250 300 200 -filt sinc < infile > outfile
3dscale_geom -c --2.375 < in_image > outfile
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 01:25:17 GMT, December 05, 2024